const mongoose = require("mongoose");

const mongoURI = "mongodb://localhost:27017/saveHair"

mongoose.connect(mongoURI, {
    useNewUrlParser: true,
    useCreateIndex: true,
    useUnifiedTopology: true,
    useFindAndModify: false
  })
  .then(() => {
    console.log("数据库连接成功")
  })
  .catch(err => {
    console.log(err)
  })
  